//******************************************************************
//
// Copyright 2016 Samsung Electronics All Rights Reserved.
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

package org.iotivity.service.ns.common;

import android.util.Log;

/**
 *
 * This class provides implementation of Notification Topic object.
 *
 */
public class Topic {

    private static final String LOG_TAG = "NotificationService_Topic";

    /**
     * This enum is used to represent subscribtion status for this Topic
     * resource
     */
    public enum TopicState {
        UNSUBSCRIBED(0),
        SUBSCRIBED(1);

        private int type;

        private TopicState(int type) {
            this.type = type;
        }

        public int getTopicState() {
            return this.type;
        }

    };

    private String     mTopicName = null;
    private TopicState mState     = TopicState.UNSUBSCRIBED;

    public Topic(String topicName, TopicState state) {
        Log.i(LOG_TAG, "Topic()");

        mTopicName = topicName;
        mState = state;
    }

    public String getTopicName() {
        return mTopicName;
    }

    public void setTopicName(String topicName) {
        mTopicName = topicName;
    }

    public TopicState getState() {
        return mState;
    }

    public void setState(TopicState state) {
        mState = state;
    }

}
